const {ipcMain} = require('electron')
const fs = require('fs');

ipcMain.on('rename',(event,arg)=>{
    fs.rename(arg.from, arg.to, function(err){
      if(err){
          //app.setName(err.message);
          event.returnValue = err.message;
      }else{
        event.returnValue = null;
      }
    });
  })